$(function() {
	hideimg();
	$("#list03").on("click", xianshi);
	$("#menu_1").on("click", menu);
	$("#menu_2").on("click", menu);
	$("#menu_3").on("click", xs);
	$("#menu_3").on("click", menu);
	$("#menu_4").on("click", menu);
	$("#menu_5").on("click", menu);
	$("#menu_1").on("click", link1);
	$(".header_banner,.gongyizhuxue,.kabeijing").on("click", fabu_xiaoshi);
	$(".more01").on("click", selectText);
});

function hideimg() {
	$("#zizhu01").hide();
	$("#qiuzhu01").hide();
}

function xianshi() {
	$("#zizhu01").show();
	$("#qiuzhu01").show();
}

function showCity() {
	$("#citys").show();
}

function hideCity(m) {
	$('#citys').hide();
	$(".location").text($(m).text());

}
var state = 1;

function menu() {
	var obj = this;
	state++;
	/*把四格图标换成灰色*/
	$("#menu_1 img").attr("src", "../../../img/app/community_ljw/menu/shouye.png");
	$("#menu_2 img").attr("src", "../../../img/app/occupational_experience/xinxihui.png");
	
	$("#menu_4 img").attr("src", "../../../img/app/community_ljw/menu/gongyi.png");
	$("#menu_5 img").attr("src", "../../../img/app/community_ljw/menu/zuyi.png");

	$(".menu_nav span").css("color", "rgb(153,153,153)");
	var index = "1";
	if(state != 1) {
		index = $(obj).attr("id").split("_")[1];
	}
	var url = "";
	switch(index) {
		case "1":
			url = "../../../img/app/community_ljw/menu/foot1.png";
			break;
		case "2":
			url = "../../../img/app/community_ljw/menu/foot2.png";
			break;
		case "3":
			url = "../../../img/app/community_ljw/menu/fabu.png";
			break;
		case "4":
			url = "../../../img/app/community_ljw/menu/foot4.png";
			break;
		case "5":
			url = "../../../img/app/community_ljw/menu/foot5.png";
			break;
	}
	if(state != 1) {
		$(obj).children().eq(0).children().eq(0).attr("src", url);
		$(obj).children().eq(1).css("color", "rgb(250,172,20)");
	} else {
		$("#menu_2").children().children().eq(0).eq(0).attr("src", url);
		$("#menu_2").children().eq(1).css("color", "rgb(250,172,20)");
	}
}

function link1() {
	window.location.href = "../index.html";
}

var number=0;
function selectText(){
	if(number==0){
		showAllTest();
		number=1;
	}else if(number==1){
		hideText();
		number = 0;
	}
}




function fabu(){
	$(".qiuzhu_img").show();
	$(".zizhu_img").show();
}

function fabu_hide(){
	$(".qiuzhu_img").hide();
	$(".zizhu_img").hide();
}


function fabu_xiaoshi(){
	$(".qiuzhu_img").hide();
	$(".zizhu_img").hide();
}

function xs(){
	if(number==0){
		fabu();
		number=1;
	}else if(number==1){
		fabu_hide();
		number = 0;
	}
}

function showAllTest(){
	$(".gy_content_text").css("-webkit-line-clamp","inherit");
	$(".more01").text("收起");
	var img = "<img class='jiantou_01'" + "src='../../../img/app/community_ljw/xiajianto01.png'/>"
	$(".more01").append(img);
}
function hideText(){
	$(".gy_content_text").css("-webkit-line-clamp","3");
	$(".more01").text("显示更多");
	var img = "<img class='jiantou_01'" + "src='../../../img/app/community_ljw/xiajianto.png'/>"
	$(".more01").append(img);
}

